package com.zy.qudadid.ui.widget;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.widget.LinearLayout;
import android.widget.ListView;

import com.zy.lcpassenger.R;


/**
 * @author  lc 
 * @date 创建时间：2016-4-25 下午4:47:12 
 * @version 1.0 
 * @Description
 */
public class ListViewMatchDialog {
    Context context;
    Dialog  ad;

    public ListView listview;
    public LinearLayout llTitle;

    public ListViewMatchDialog(Context context) {
        // TODO Auto-generated constructor stub
        this.context=context;
//        ad=new Dialog.Builder(context).create();
        ad = new Dialog(context);
        ad.requestWindowFeature(Window.FEATURE_NO_TITLE);
        ad.show();
        //关键在下面的两行,使用window.setContentView,替换整个对话框窗口的布局
        Window window = ad.getWindow();
        window.setContentView(R.layout.dialog_listview_match);
        window.setBackgroundDrawableResource(R.drawable.border_white_4dp);
        ad.setCancelable(true);

        listview = (ListView) window.findViewById(R.id.dialog_listview);
        llTitle = (LinearLayout) window.findViewById(R.id.dialog_listview_llTitle);

    }


    /**
     * 关闭对话框
     */
    public void dismiss() {
        ad.dismiss();
    } 
    
    
}
